<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <#include "../common.ftl">
</head>
<body class="childrenBody">
<form class="layui-form" style="width:80%;">
    <div class="layui-form-item">

        <input name="id" id="id" type="hidden" value="${(emp.id)!}"/>
        <input id="dept" type="hidden" value="${emp.deptId}">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input type="text" name="empName" lay-verify="required" autocomplete="off" placeholder="员工姓名"
                   value="${emp.empName}" readonly="true"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">联系方式</label>
        <div class="layui-input-block">
            <input type="text" name="empPhone" lay-verify="phone" autocomplete="off" placeholder="联系方式"
                   value="${emp.empPhone}"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-block">
            <input type="email" name="empEmail" lay-verify="title" autocomplete="off" placeholder="邮箱"
                   value="${emp.empEmail}"
                   class="layui-input">
        </div>
    </div>
    <!-- 部门异步展示只加载员工当前部门 可以修改-->
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">部门</label>
        <div class="layui-input-block">
            <select name="deptId" id="deptId" lay-verify="required">
            </select>
        </div>
    </div>

    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">岗位</label>
        <div class="layui-input-block">
            <#if emp.isLeader??>
                <select name="isLeader" lay-verify="required">
                    <option value="">请选择岗位</option>
                    <option value="0" <#if emp.isLeader==0>selected="selected"</#if> >员工</option>
                    <option value="1" <#if emp.isLeader==1>selected="selected"</#if>>组长</option>
                    <option value="2" <#if emp.isLeader==2>selected="selected"</#if>>总经理</option>
                </select>
            </#if>
        </div>
    </div>

    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">角色</label>
        <div class="layui-input-block">
            <select name="roleIds" xm-select="selectId">
            </select>
        </div>
    </div>

    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">学历</label>
        <div class="layui-input-block">
            <#if emp.empEducation??>
                <select name="empEducation" lay-verify="required">
                    <option value="">请选择学历</option>
                    <option value="0" <#if emp.empEducation=="0">selected="selected"</#if> >中专</option>
                    <option value="1" <#if emp.empEducation=="1">selected="selected"</#if>>大专</option>
                    <option value="2" <#if emp.empEducation=="2">selected="selected"</#if>>本科</option>
                    <option value="3" <#if emp.empEducation=="3">selected="selected"</#if>>硕士</option>
                    <option value="4" <#if emp.empEducation=="4">selected="selected"</#if>>博士</option>
                </select>
            </#if>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="updateEmp">立即提交</button>
            <button class="layui-btn layui-btn-lg layui-btn-normal" id="closeBtn">取消</button>
        </div>
    </div>
</form>
<script type="text/javascript" src="${ctx}/layuimini/js/emp/update.emp.js"></script>
</body>
</head>
</html>

